package org.sgmiller.quickstem;

import java.util.Iterator;
import java.util.concurrent.ConcurrentHashMap;

class ConcurrentHashSet<E> implements Iterable<E> {

	ConcurrentHashMap<E,Boolean> backingStore;
	
	public ConcurrentHashSet(int concurrencyLevel) {
		backingStore=new ConcurrentHashMap<E, Boolean>(8,3,1);
	}

	public void add(E e) {
		backingStore.put(e,true);
	}

	public Iterator<E> iterator() {
		return backingStore.keySet().iterator();
	}
}
